package org.trafficman.trafficman_sample_test;

import org.junit.*;
import org.junit.Test;
import org.punit.convention.*;
import org.punit.runner.*;

import junit.framework.*;
import org.punit.annotation.After;
import org.punit.annotation.AfterClass;
import org.punit.annotation.Before;
import org.punit.annotation.BeforeClass;

public class JUnitAnnotationSample extends TestCase {
	
	public static void main(String[] args) {
		SoloRunner runner = new SoloRunner();
		runner.setConvention(new JUnitAnnotationConvention());
		runner.run(JUnitAnnotationSample.class);
	}
	
    @BeforeClass
	public static void init() {
		System.out.println("beforeClass"); //$NON-NLS-1$
	}
    
    @AfterClass
    public static void close() {
    	System.out.println("afterClass"); //$NON-NLS-1$
    }
    
    @Before
    public void before() {
    	System.out.println("before"); //$NON-NLS-1$
    }
    
    @After
    public void after() {
    	System.out.println("after"); //$NON-NLS-1$
    }
    
    public void test1() {
    	System.out.println("test1"); //$NON-NLS-1$
    }
    
    @Test(expected = NullPointerException.class)
    public void test2() {
    	System.out.println("test2"); //$NON-NLS-1$
    	throw new NullPointerException();
    }
    
    @Test
    public void test3() {
    	System.out.println("test3"); //$NON-NLS-1$
    }
}
